package com.eati.cm.auth;

import org.springframework.data.util.Pair;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

public class ThirdpartyAuthCBToken extends AbstractAuthenticationToken {

	private static final long serialVersionUID = -8612808117656666774L;
	public String cbCode;
	public String thirdpartyAuthPlatformName;

    public ThirdpartyAuthCBToken(String cbCode, String thirdpartyAuthPlatformName) {
        super(null);
        this.cbCode = cbCode;
        this.thirdpartyAuthPlatformName = thirdpartyAuthPlatformName;
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return Pair.of(thirdpartyAuthPlatformName, cbCode);
    }
}
